module_name:=ov7670
obj-m:=$(module_name).o
KERNELDIR ?=/home/jun/arm/linux-3.12.60
PWD :=$(shell pwd)

# showimg config
OPENCV-INCPATH = /home/jun/arm/opencv-2.4.12/include
OPENCV-LIB = /home/jun/opencv/lib

default:
	$(MAKE) -Wall -C $(KERNELDIR) M=$(PWD) modules

showimg:
	g++ -Wall -O2 -I${OPENCV-INCPATH} -c showimg.cpp -o showimg.o
	g++ -o showimg showimg.o  -s  ${OPENCV-LIB}/libopencv_core.so ${OPENCV-LIB}/libopencv_highgui.so

clean:
	rm -rf *.o *~ *.ko *.mod.c *.order *.symvers .*.o.cmd .*.ko.cmd
